import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/user',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/user/',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/user/editAuth',
    method: 'put',
    data
  })
}
export function getAuth(params) {
  return request({
    url: 'api/user/getAuth',
    method: 'get',
    params: params
  })
}
export function editAuth(data) {
  return request({
    url: 'api/user/editAuth',
    method: 'put',
    data
  })
}
export function getDriver(params) {
  return request({
    url: 'api/user/driver',
    method: 'get',
    params: params
  })
}
export default { add, edit, del, editAuth, getAuth, getDriver }
